<?php


namespace app\model;


use think\Model;

class Role extends Model
{
//主键
    protected $pk = "rid";
    //表名
    protected $name = "role";
    // 设置当前模型对应的完整数据表名称
    protected $table = 'jw_role';

    protected $schema = [
        "name" => "string",//'名称',
        "content" => "string",//'说明',
        "role" => "string",//'权限ID',
        "addtime" => "datetime",// '添加时间',
        "lasttime" => "datetime",// '更新时间',
    ];

    /**
     * info: 获取所有角色
     * User: 伍先生
     * Argument:
     * DateTime: 2020/12/9 14:22
     * Url: getRoleAll
     */
    public static function getRoleAll(){
        return self::select()->toArray();
    }
}